package com.shujia.java.day10.demo2;

public class Test1 {
    public static void main(String[] args) {
        Master master = new Master();
        master.setName("主人");
        Pet pet=master.gPet(1);
        Dog dog=(Dog)pet;
        dog.setHealth(100);
        dog.setName("Test");
        dog.setKind("哈士奇");
        dog.eat();
    }
}
